require(quanteda)
require(LSX)
require(gplots)

toks <- readRDS("data/tokens_de.rds")
lss <- readRDS("lss_de3.rds")

dfmt <- dfm(toks)
dat <- docvars(dfmt)
dat$lss <- predict(lss, dfmt, min_n = 10)
dat$lss_bin <- cut(dat$lss, c(-Inf, -3:3, Inf))

saveRDS(dat, "data_predict_de.rds")
